x <- seq(1, 10) y <- x^2
2025-09-16
Introduction
This presentation shows an interactive Plotly plot created with R.
The goal is to demonstrate interactive data visualization. ## Slide with Plotly
library(plotly)
## Loading required package: ggplot2
## ## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2': ## ## last_plot
## The following object is masked from 'package:stats': ## ## filter
## The following object is masked from 'package:graphics': ## ## layout
library(dplyr)
## ## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats': ## ## filter, lag
## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union
x <- seq(1, 10) y <- x^2
plot_ly(x = ~x, y = ~y, type = 'scatter', mode = 'lines+markers',
name = 'y = x^2') %>%
layout(title = "Interactive Plotly Plot",
xaxis = list(title = "X-axis"),
yaxis = list(title = "Y-axis"))
Conclusion
This presentation demonstrates how to create an interactive Plotly plot in R Markdown.
It is hosted as a web page and includes the creation date.